﻿using System;
using System.Windows.Forms;
using HYCodeBase.WinForm.WinFormRemindSuit;

namespace QuickModel.Models
{
	public class RadioButtonControlInfoTransform : ICustomControlInfoTransform
	{
		public string GetControlStr(System.Windows.Forms.Control inputControl)
		{
			RadioButton radioButton = inputControl as RadioButton;
			bool flag = radioButton == null;
			string result;
			if (flag)
			{
				result = "";
			}
			else
			{
				result = (radioButton.Checked ? "1" : "0");
			}
			return result;
		}

		public void SetControlStr(ref System.Windows.Forms.Control inputControl, string inputStr)
		{
			RadioButton radioButton = inputControl as RadioButton;
			bool flag = radioButton == null;
			if (!flag)
			{
				radioButton.Checked = (inputStr == "1");
			}
		}
	}
}
